package com.hhkj.admin.question.model.extend;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.ruoyi.common.model.excel.ExcelImportBase;
import com.ruoyi.common.utils.excl.annotation.Required;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * QuestionImportModel
 *
 * @author HHKJ-SERVER-ZJ
 * @since 2023/5/16 13:51
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class QuestionImportModel extends ExcelImportBase {
    /** 导入模板 */
    public static final String FILE_NAME = "题目导入模板";
    public static final String TITLE_NAME = "题目导入模板\n" +
            "1、红色字段是否案例题、题目类型、题目内容、题目答案为必填项" + "\n" +
            "2、填写内容时注意取消掉空格" + "\n" +
            "3、不要修改sheet表名，会导致科目名称不对应" + "\n" +
            "4、由于sheet表名是自动生成，每次导入需要下载新模板" + "\n" +
            "5、是否案例题、题目类型请使用下拉填写" + "\n" +
            "6、案例题题目格式：第一行为 题目背景材料" + "\n" +
            "7、判断题 A正确 B错误 答案只需要填写A/B" + "\n" +
            " ";
    public static final String SHEET_NAME = "科目名称";
    public static final Integer TITLE_HEIGHT = 2700;
    public static final Integer EXCEL_NAME_FONT_HEIGHT = 20;
    public static final Integer FILL_DATA_FONT_HEIGHT = 10;

    /** 是否案例题 1-是 0-否 */
    @Required
    @Excel(name = "是否案例题", replace = {"否_0", "是_1"}, type = 1)
    private Integer caseFlag;

    /** 题目类型 single 单选题、 multiple 多选题、 judge 判断题 */
    @Required
    @Excel(name = "题目类型", replace = {
            "单选题_single", "多选题_multiple", "判断题_judge", "案例题_case",
            "填空题_fillBlank", "简答题_shortAnswer"
    }, orderNum = "1", type = 1)
    private String typeCode;

    /** 题目内容 */
    @Required
    @Excel(name = "题目内容", width = 60, orderNum = "2", type = 1)
    private String content;

    /** 选项A */
    @Excel(name = "选项A", orderNum = "3", type = 1)
    private String optionA;

    /** 选项B */
    @Excel(name = "选项B", orderNum = "4", type = 1)
    private String optionB;

    /** 选项C */
    @Excel(name = "选项C", orderNum = "5")
    private String optionC;

    /** 选项D */
    @Excel(name = "选项D", orderNum = "6")
    private String optionD;

    /** 选项E */
    @Excel(name = "选项E", orderNum = "7")
    private String optionE;

    /** 题目答案["A"] */
    @Required
    @Excel(name = "题目答案", orderNum = "8")
    private String answer;

    /** 题目分析 */
    @Excel(name = "解析", orderNum = "9")
    private String analysisContent;

    public QuestionImportModel(Integer caseFlag, String typeCode, String content, String optionA, String optionB, String optionC, String optionD, String optionE, String answer) {
        this.caseFlag = caseFlag;
        this.typeCode = typeCode;
        this.content = content;
        this.optionA = optionA;
        this.optionB = optionB;
        this.optionC = optionC;
        this.optionD = optionD;
        this.optionE = optionE;
        this.answer = answer;
    }
}
